﻿using PhuLeBooze.UICode;
using PhuLeBussinessObject.Site;
using PhuLeDao.Site;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace PhuLeBooze
{
    public partial class MasterPage : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //try
                //{
                //CSiteDao siteDao = new CSiteDao();
                //IList<CConfigSite> list = siteDao.GetConfigSite("<InputValue Context=\"GetSiteConfig\" />");
                //if (list != null)
                //{
                if (CConfigSiteEntity.CompanyName == null)
                    CConfigSiteEntity.ReadConfig();
                ltrCompanyName.Text = CConfigSiteEntity.CompanyName;
                ltrAddress.Text = CConfigSiteEntity.Address;
                ltrPhone.Text = CConfigSiteEntity.Phone;
                ltrEmail.Text = CConfigSiteEntity.Email;
                ltrCopyright.Text = CConfigSiteEntity.Copyright;
                //    }
                //}
                //catch (Exception ex) { }
            }
        }
    }
}